import Vue from 'vue'
import App from './App.vue'
//引入路由
import router from './router'
//引入仓库
import store from './store'
//引入方法
import * as API from './api/index'
//全局组件
import Tabbar from './components/Tabbar.vue'
//搜索框全局组件
import SearchContext from './components/SearchContext.vue'
// 引入vant图片功能
import { Image as VanImage } from 'vant';
Vue.use(VanImage);
//引入vant组件
import {Tag ,Sidebar, SidebarItem, Grid, GridItem,Search,Swipe, SwipeItem ,Panel ,Col, Row,Divider } from 'vant';

Vue.use(Search);
Vue.use(Swipe);
Vue.use(SwipeItem);
Vue.use(Grid);
Vue.use(GridItem);
Vue.use(Panel );
Vue.use(Col );
Vue.use(Row );
Vue.use(Sidebar );
Vue.use(SidebarItem );
Vue.use(Divider  );
Vue.use(Tag);


import "@/vantui"

Vue.filter("RMBformat", val => {
  return "¥" + Number(val).toFixed(2) + "元"
})

 


import 'lib-flexible/flexible'



//注册全局组件
Vue.component('Tabbar',Tabbar)
Vue.component('SearchContext',SearchContext)
Vue.config.productionTip = false

new Vue({
  render: h => h(App),
  beforeCreate(){
    //配置全局事件总线
    Vue.prototype.$bus = this;
    //获取方法
    Vue.prototype.$API = API
  },
  //注册路由,给组件的身上添加了$router与$route两个属性
  router,
  store
}).$mount('#app')





